<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
    <title>新的投票</title>
    <script th:src="@{/static/ckeditor/ckeditor.js}"></script>
</head>
<body>

<div th:replace="header :: nav"></div>

<div class="container">

    <div th:replace="header :: meLeft"></div>

    <div class="col-xs-10">
        <form class="form-horizontal" th:action="@{/newVote}" method="post">
            <input type="hidden" name="${_csrf.headerName}" value="${_csrf.token}"/>
            <div class="form-group">
                <label for="title" class="col-xs-2 control-label">标题:</label>
                <div class="col-xs-10">
                    <input type="text" id="title" name="title" class="form-control">
                </div>
            </div>
            <div class="form-group">
                <label for="content" class="col-xs-2 control-label">简介:</label>
                <div class="col-xs-10">
                    <textarea name="content" id="content" class="form-control">
                        PHP是世界上最好的语言
                    </textarea>
                    <script>
                        // Replace the <textarea id="editor1"> with a CKEditor
                        // instance, using default configuration.
                        CKEDITOR.replace('content',{
                            customConfig: '/static/ckeditor/config.js'
                        });
                    </script>
                </div>
            </div>
            <div class="form-group">
                <label for="options" class="col-sm-2 control-label">Options</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="options" id="options" placeholder="投票的选项，用，隔开">
                </div>
            </div>
            <div class="form-group">
                <div class="col-xs-offset-2 col-xs-10">
                    <input type="submit" class="btn btn-default">
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>